﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class MapInfo_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            Bind();

    }
    private void Bind()
    {
      

        //支队包括过去
        lblSumCount.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount("1=1").ToString();

        //支队机关总数
        lblZhiDui.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount("Right(DepartmentID,2)='00' ").ToString();

        lblBigSumCount.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount("Right(Left(DepartmentID, 5), 1) = '2' ").ToString();
        //市区中队总数
        lblSumCenterCount.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" DepartmentID In(Select DepartmentID From DepartmentKinds Where Right(Left(DepartmentID,5),1)='3') And Right(Left(DepartmentID,5),1)='3'").ToString();
        lblXianSumCount.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" DepartmentID Not In(Select DepartmentID From DepartmentKinds Where Right(Left(DepartmentID,5),1)='3') And Right(Left(DepartmentID,5),1)='3'").ToString();
        // lblCount.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount("Left(DepartmentID,4)='"+DepartmentID.Substring(0,4)+"'").ToString();

        lblOk1.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" IsPass=1 ").ToString();
        lblCount2.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" IsPass=0 ").ToString();

        //已达标支队支队
        lblZhiDuiOK.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" IsPass=1  And Right(DepartmentID,2)='00' ").ToString();
        //未达标支队
        lblZhiDuiNo.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" IsPass=0  And Right(DepartmentID,2)='00' ").ToString();

        //已通过大队0：未通1已通过
        lblBig.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" IsPass=1  And Right(Left(DepartmentID,5),1)='2' ").ToString();

        lblBig2.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCount(" IsPass=0  And Right(Left(DepartmentID,5),1)='2' ").ToString();

        //已达标市区中队数量
        lblCenter.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCenterOK2(true, "", true).ToString();
        //已达标县市中队数量
        lblXian.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCenterOK2(false, "", true).ToString();

        //未达标市区中队数量
        lblCenter2.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCenterOK2(true, "", false).ToString();
        //未达标县市中队数量
        lblXian2.Text = Yipusoft.MapInfo.BLL.DepartmentPass.GetCenterOK2(false, "", false).ToString();

    }

}
